            //region Query printer status
            int trytimes=0;
            int printerstatuscode=usbConnection.getPrinterStatus();//Query printer status
            if(printerstatuscode!=0)//0 is ready
            {
                if (printerstatuscode == 4 || printerstatuscode == 1)//Printing or syntax error. Syntax error often occurs when the printer retries
                {
                    while (trytimes < 10)//Retry 10 times
                    {
                        try {
                            Thread.sleep(1000);//Pause for 1 second
                        }
                        catch(Exception e)
                        {}
                        printerstatuscode=usbConnection.getPrinterStatus();//Query printer status
                        if (printerstatuscode != 4 && printerstatuscode != 1)
                            break;

                        trytimes++;
                    }
                    if(trytimes>=10)
                    {
                        System.out.println("Printer status is abnormal:"+printerstatuscode);
                        break;
                    }
                }
                else if (printerstatuscode == 96)//The stripper is waiting to remove the label
                {
                    System.out.println("The stripper is waiting to remove the label。");
                    while (true)
                    {
                        try {
                            Thread.sleep(1000);//Pause for 1 second
                        }
                        catch(Exception e)
                        {}
                        printerstatuscode=usbConnection.getPrinterStatus();//Query printer status
                        if (printerstatuscode != 96)
                            break;
                    }
                }
                else if (printerstatuscode == 88)//suspend
                {
                    System.out.println("The printer is currently paused. Press the "Pause" button of the printer to restart printing.");
                    while (true)
                    {
                        try {
                            Thread.sleep(1000);//Pause for 1 second
                        }
                        catch(Exception e)
                        {}
                        printerstatuscode=usbConnection.getPrinterStatus();//Query printer status
                        if (printerstatuscode != 88)
                            break;
                    }
                }
                   else if (printerstatuscode == 81) {
                    System.out.println("Main board hardware failure, please contact after-sales service.");
                    break;
                }
                else if (printerstatuscode == 82) {
                    System.out.println("There is an error in the carbon tape detection of the printer. Please check whether the carbon tape is installed properly!");
                    break;
                }
                else if (printerstatuscode == 83) {
                    System.out.println("There is an error in the label detection of the printer. Please check whether the label is installed properly. After changing labels of different sizes, you need to manually calibrate the paper!");
                    break;
                }
                else if (printerstatuscode == 86) {
                    System.out.println("There is an error in the cutter detection of the printer. Please check whether the cutter function is enabled!");
                    break;
                }
                else if (printerstatuscode == 89) {
                    System.out.println("Label paper is used up, please install a new label!");
                    break;
                }
                else if (printerstatuscode == 90){
                    System.out.println("RFID tag read/write error!");
                    break;
                }
                else if (printerstatuscode == 91||printerstatuscode == 92) {
                    System.out.println("RFID tag signal calibration error!");
                    break;
                }
                else if (printerstatuscode == 120)//Upgrade completed
                {
                    System.out.println("The printer has been upgraded. Please follow the upgrade tool tips.");
                    break;
                }
                else
                {
                    System.out.println("Printer status is abnormal:"+printerstatuscode);
                    break;
                }
            }
            //endregion